home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / Grant's CGI Framework 1.0b14 / Interface / Menus / MenuEdit.c < prev    next >
Text File  |  1996-04-08  |  2KB  |  98 lines

  1. /*****
  2.  *
  3.  *    MenuEdit.c
  4.  *
  5.  *    This is a support file for "Grant's CGI Framework".
  6.  *    Please see the license agreement that accompanies the distribution package
  7.  *    for licensing details.
  8.  *
  9.  *    Copyright ©1995,1996 by Grant Neufeld
  10.  *    grant@acm.com
  11.  *    http://arpp.carleton.ca/grant/
  12.  *
  13.  *****/
  14.  
  15. #include "MyConfiguration.h"
  16. #if kCompileWithForeground
  17.  
  18. #include "compiler_stuff.h"
  19. #include "globals.h"
  20.  
  21. #include "MenuFunc.h"
  22. #include "WindowInt.h"
  23.  
  24. #include "MenuEdit.h"
  25.  
  26.  
  27. /***  FUNCTIONS  ***/
  28.  
  29. void
  30. doEditMenu ( short theItem, short modifiers )
  31. {
  32.     if ( !(SystemEdit (theItem)) )    /* SystemEdit returns true if desk accessory is front */
  33.     {
  34.         /* support for edit menus here used in application */
  35.         switch (theItem)
  36.         {
  37.             case kmiUndo :
  38.                 break;
  39.             
  40.             case kmiCut :
  41.                 break;
  42.             
  43.             case kmiCopy :
  44.                 break;
  45.             
  46.             case kmiPaste :
  47.                 break;
  48.             
  49.             case kmiClear :
  50.                 break;
  51.             
  52.             case kmiSelectAll :
  53.                 break;
  54.             
  55.             default :
  56.                 break;
  57.         }
  58.     }
  59. } /* doEditMenu */
  60.  
  61.  
  62. void
  63. adjustEditMenu ( window_type theWindowType )
  64. {
  65.     switch ( theWindowType )
  66.     {
  67.         case Window_DA :
  68.         case Window_dlgModal :
  69.         case Window_dlgMoveableModal :
  70.             EnableItem  (gmEditMenu, kmiUndo);
  71.             EnableItem  (gmEditMenu, kmiCut);
  72.             EnableItem  (gmEditMenu, kmiCopy);
  73.             EnableItem  (gmEditMenu, kmiPaste);
  74.             EnableItem  (gmEditMenu, kmiClear);
  75.             DisableItem (gmEditMenu, kmiSelectAll);
  76.             break;
  77.  
  78.         case Window_UNKNOWN :
  79.         case Window_about :
  80.         case Window_none :
  81.         case Window_Application :
  82.         default :
  83.             DisableItem (gmEditMenu, kmiUndo);
  84.             DisableItem (gmEditMenu, kmiCut);
  85.             DisableItem (gmEditMenu, kmiCopy);
  86.             DisableItem (gmEditMenu, kmiPaste);
  87.             DisableItem (gmEditMenu, kmiClear);
  88.             DisableItem (gmEditMenu, kmiSelectAll);
  89.     }
  90.     
  91.     EnableItem ( gmEditMenu, kmTheWholeMenu );
  92. } /* adjustEditMenu */
  93.  
  94.  
  95. #endif    /* kCompileWithForeground */
  96.  
  97. /*****  EOF  *****/
  98.